package com.tengol.demo.design.pattern.creational.builder;

/**
 * Director
 *
 * @author dongrui
 * @date 2019/03/01
 */
public class Director {
    private CourseBuilder courseBuilder;

    public void setCourseBuilder(CourseBuilder courseBuilder) {
        this.courseBuilder = courseBuilder;
    }

    public Course makeCourse(String courseName){
        courseBuilder.buildCourseName(courseName);
        courseBuilder.buildCoursePPT(courseName + "PPT");
        courseBuilder.buildCourseVideo(courseName + "Video");
        courseBuilder.buildCourseArticle(courseName + "Article");
        courseBuilder.buildCourseQa(courseName + "QA");
        return courseBuilder.makeCourse();
    }

}
